using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace MyHomeworkWebAPi.Models.ef;

public class ProductCategory
{
    /// <summary>
    /// 分类ID
    /// </summary>
    [Key]
    public Guid CategoryId { get; set; }

    /// <summary>
    /// 分类名称
    /// </summary>
    [Required]
    [StringLength(50)]
    public string Name { get; set; } = null!;

    /// <summary>
    /// 是否使用
    /// </summary>
    public byte IsUse { get; set; }

    public virtual ICollection<Product> Products { get; set; } = new List<Product>();
} 